package com.ylcy.ads.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import com.ylcy.ads.schedule.ScheduleService;

/**
 * 调起目标服务
 */
public class BootService extends Service {
    public BootService() {
    }

    @Override
    public IBinder onBind(Intent intent) {
        // TODO: Return the communication channel to the service.
        throw new UnsupportedOperationException("Not yet implemented");
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        //定时调用完成应用调起操作
        ScheduleService.start();
        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public void onDestroy() {
        ScheduleService.stop();
        super.onDestroy();
    }
}
